<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thmeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>销售管理系统</title>
    <link rel="icon" type="image/x-icon" href="images/icon.ico" sizes="32x32">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/clipboard.js-master/dist/clipboard.min.js"></script>
    <script>function exportFile(){
        var form=$("<form>");
        form.attr("style","display:none");
        form.attr("target","");
        form.attr("method","post");//提交方式为post
        form.attr("action","/downloadFile");//定义action
        $("body").append(form);
        form.submit();
    }</script>
    <link rel="stylesheet" href="/css/bootstrap.css">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/bootstrap.css.map">
    <link rel="stylesheet" href="/css/bootstrap.min.css.map">
    <link rel="stylesheet" href="/css/bootstrap-theme.css">
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/css/bootstrap-theme.css.map">
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css.map">
</head>
<style>
    body{
    ;
    }
</style>
<body>
<nav class = "navbar navbar-default" role = "navigation">
    <div class="navbar-header">
        <a class="navbar-brand">销售管理系统</a>
    </div>
    <ul class="nav navbar-nav">
        <li class="active"><a href="#">网站首页</a></li>
        <li><a href="/list" th:if="${session.loginUser!=null}">订单列表</a></li>
        <li><a href="/commit" th:if="${session.loginUser!=null}">提交订单</a></li>
        <li><a href="/manage" th:if="${session.loginUser!=null}">订单管理</a></li>
        <li><a href="/admin" th:if="${session.adminUser!=null}">管理员面板</a></li>
        <li><a href="#" th:if="${session.loginUser==null}">登陆后查看更多内容</a></li>
    </ul>
    <button style="position: absolute; right: 15px;" type="button" href="#" class="tbox btn btn-default navbar-btn" th:if="${session.loginUser==null}">登录</button>
    <p style="position: absolute; right: 15px; margin-top: 10px; font-size: 20px" th:text="${session.loginUser}"></p>
</nav>
<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <h4 class="modal-title" align="center">登录使用更多功能</h4>
                <br/>
                <form class="form-horizontal" role="form" method="post" action="login">
                    <div class="form-group">
                        <label for="name" class="col-sm-offset-2 col-sm-2 control-label">用户名</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="name" name="username" placeholder="请输入正确的用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="password" class="col-sm-offset-2 col-sm-2 control-label">密码</label>
                        <div class="col-sm-5">
                            <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-sm-5">
                            <button id="submitBtn" type="submit" class="btn btn-default btn-block btn-primary" >登录</button>
                        </div>
                    </div>
                </form>
                <p style="color: red" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
            </div>
            <div class="modal-footer">
            </div>
        </div>
        <!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script type="text/javascript">
    $(function(){

        $(".tbox").click(function(){
            $('#myModal').modal('show') //显示模态框
        })

    });
</script>
</body>
</html>